package manong.beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;

	public class Stu implements Cloneable, Serializable {

	    private Integer id;
	    private String studentName;
	    private String studentPhone;
	    private String className;
	    private Integer classid;
	    private Integer statu;
	    private String mark;
	    private Integer sno;
	    private String speciality;
	    private static final long serialVersionUID = 1L;
	    public Stu(Integer id, String studentName, String className,Integer classid, Integer sno,Integer statu,String mark,String studentPhone,String speciality) {
	        this.id = id;
	        this.studentName = studentName;
	        this.className = className;
	        this.classid = classid;
	        this.sno = sno;   
	        this.statu = statu;
	        this.mark = mark;
	        this.studentPhone = studentPhone;
	        this.speciality = speciality;
	    }

	    public Stu() {
	        super();
	    }


    public Integer getId() {
	        return id;
	    }

	   
	    public Stu withId(Integer id) {
	        this.setId(id);
	        return this;
	    }

	   
	    public void setId(Integer id) {
	        this.id = id;
	    }
 
	    
	    
	    
	    
	    
	    

	    public String getStudentName() {
	        return studentName;
	    }

	  
	    public Stu withStudentName(String studentName) {
	        this.setStudentName(studentName);
	        return this;
	    }

	  
	    public void setStudentName(String studentName) {
	        this.studentName = studentName;
	    }

	    
	    
	    
	    
	  
	    public String getStudentPhone() {
	        return studentPhone;
	    }


	    public Stu withStudentPhone(String studentPhone) {
	        this.setStudentPhone(studentPhone);
	        return this;
	    }

	 
	    public void setStudentPhone(String studentPhone) {
	        this.studentPhone = studentPhone;
	    }


	    
	    
	    
	    public String getClassName() {
	        return className;
	    }

	  
	    public Stu withClsaaName(String className) {
	        this.setClassName(className);
	        return this;
	    }

	  
	    public void setClassName(String className) {
	        this.className = className;
	    }
	    
	    
	    
	    
	    
	    public Integer getClassid() {
	        return classid;
	    }

	    public Stu withClassid(Integer classid) {
	        this.setClassid(classid);
	        return this;
	    }


	    public void setClassid(Integer classid) {
	        this.classid = classid;
	    }

	    
	    
	    
	    
	    
	    
	 
	        public Integer getStatu() {
	        return statu;
	    }    
	 
	    public Stu withStatu(Integer statu) {
	        this.setStatu(statu);
	        return this;
	    }

	    public void setStatu(Integer statu) {
	        this.statu = statu;
	    }


	    
	    
	    
	    
	    public String getMark() {
	        return mark;
	    }


	    public Stu withMark(String mark) {
	        this.setMark(mark);
	        return this;
	    }


	    public void setMark(String mark) {
	        this.mark = mark;
	    }

	    
	    
	    
	    public Integer getSno() {
	        return sno;
	    }

	    public Stu withSno(Integer sno) {
	        this.setSno(sno);
	        return this;
	    }


	    public void setSno(Integer sno) {
	        this.sno = sno;
	    }
	    
	    
	
	    
	    
	    public String getSpeciality() {
	        return speciality;
	    }


	    public Stu withSpeciality(String speciality) {
	        this.setMark(speciality);
	        return this;
	    }


	    public void setSpeciality(String speciality) {
	        this.speciality = speciality;
	    }

	    
	    
	    
	    
	    @Override
	    public boolean equals(Object that) {
	        if (this == that) {
	            return true;
	        }
	        if (that == null) {
	            return false;
	        }
	        if (getClass() != that.getClass()) {
	            return false;
	        }
	       Stu other = ( Stu) that;
	        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
	            && (this.getStudentName() == null ? other.getStudentName() == null : this.getStudentName().equals(other.getStudentName()))
	            && (this.getClassName() == null ? other.getClassName() == null : this.getClassName().equals(other.getClassName()))
	            && (this.getClassid() == null ? other.getClassid() == null : this.getClassid().equals(other.getClassid()))
	            && (this.getSno() == null ? other.getSno() == null : this.getSno().equals(other.getSno()))
	            && (this.getStatu() == null ? other.getStatu() == null : this.getStatu().equals(other.getStatu()))
	            && (this.getMark() == null ? other.getMark() == null : this.getMark().equals(other.getMark()))
	            && (this.getStudentPhone() == null ? other.getStudentPhone() == null : this.getStudentPhone().equals(other.getStudentPhone()))     
	            && (this.getSpeciality() == null ? other.getSpeciality() == null : this.getSpeciality().equals(other.getSpeciality()));
     
	    }
	
	 
	    @Override
	    public int hashCode() {
	        final int prime = 31;
	        int result = 1;
	        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
	        result = prime * result + ((getStudentName() == null) ? 0 : getStudentName().hashCode());
	        result = prime * result + ((getClassName() == null) ? 0 : getClassName().hashCode());	      
	        result = prime * result + ((getClassid() == null) ? 0 : getClassid().hashCode());
	        result = prime * result + ((getSno() == null) ? 0 : getSno().hashCode());
	        result = prime * result + ((getStatu() == null) ? 0 : getStatu().hashCode());	
	        result = prime * result + ((getMark() == null) ? 0 : getMark().hashCode());    
	        result = prime * result + ((getStudentPhone() == null) ? 0 : getStudentPhone().hashCode());
	        result = prime * result + ((getSpeciality() == null) ? 0 : getSpeciality().hashCode());
	        return result;
	    }

	 

	    
	    @Override
	    public String toString() {
	        StringBuilder sb = new StringBuilder();
	        sb.append(getClass().getSimpleName());
	        sb.append(" [");
	        sb.append("Hash = ").append(hashCode());
	        sb.append(", id=").append(id);
	        sb.append(", studentName=").append(studentName);
	        sb.append(", className=").append(className);
	        sb.append(", classid=").append(classid);
	        sb.append(", sno=").append(sno);
	        sb.append(", statu=").append(statu);
	        sb.append(", mark=").append(mark);
	        sb.append(", studentPhone=").append(studentPhone);
	        sb.append(", speciality=").append(speciality);
	        sb.append("]");
	        return sb.toString();
	    }

	    
	    
	  
	   
	    @Override
	    public Stu clone() throws CloneNotSupportedException {
	        return (Stu) super.clone();
	    }


	    public enum Column {
	        id("id", "id", "INTEGER", false),
	        studentName("stu_name", "studentName", "VARCHAR", false),
	        className("class_Name", "className", "VARCHAR", false),
	        classid("class_id", "classid", "INTEGER", false),
	        sno("stu_sno", "sno", "INTEGER", false),
	        statu("statu", "statu", "INTEGER", false),
	        mark("mark", "mark", "VARCHAR", false),
	    	  studentPhone("phone", "studentPhone", "VARCHAR", false),
	    	speciality("speciality", "speciality", "VARCHAR", false);
	
	    	
	    
	    	
	    	
	        private static final String BEGINNING_DELIMITER = "`";

	        private static final String ENDING_DELIMITER = "`";


	        private final String column;


	        private final boolean isColumnNameDelimited;


	        private final String javaProperty;


	        private final String jdbcType;


	        public String value() {
	            return this.column;
	        }

	        public String getValue() {
	            return this.column;
	        }

	 
	        public String getJavaProperty() {
	            return this.javaProperty;
	        }


	        public String getJdbcType() {
	            return this.jdbcType;
	        }


	        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
	            this.column = column;
	            this.javaProperty = javaProperty;
	            this.jdbcType = jdbcType;
	            this.isColumnNameDelimited = isColumnNameDelimited;
	        }

	  
	        
	        public String desc() {
	            return this.getEscapedColumnName() + " DESC";
	        }

	     
	        public String asc() {
	            return this.getEscapedColumnName() + " ASC";
	        }

	   
	        public static Column[] excludes(Column ... excludes) {
	            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
	            if (excludes != null && excludes.length > 0) {
	                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
	            }
	            return columns.toArray(new Column[]{});
	        }

	        public String getEscapedColumnName() {
	            if (this.isColumnNameDelimited) {
	                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
	            } else {
	                return this.column;
	            }   
	        }
	        
	        
	    }
	    
	    
	    
	    
	}

